import { PetSkillListPanel } from "../skill/PetSkillListPanel";
import { PetSkillItem } from "../skill/PetSkillItem";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
//class PetDetailSkillListPanel
    
    export  class PetDetailSkillListPanel extends PetSkillListPanel
    {
        constructor()
        {
            super();
            return;
        }

        public /* override */ init(arg1: Boolean=false): void
        {
            var loc1=null;
            var loc2=null;
            var loc3=0;
            loc3 = 0;
            while (loc3 < 14) 
            {
                loc1 = new PetSkillItem();
                loc1.isDig = false;
                loc1.setSize(32, 32);
                loc1.y = 3;
                if (loc3 < 12) 
                {
                    loc2 = GlobalClass.getBitmap(ImagesConst.PackItemBg);
                    loc2.x = loc3 % 6 * 40;
                    loc2.y = Math.floor(loc3 / 6) * 42;
                    if (loc3 < 4) 
                    {
                        loc1.type = 0;
                    }
                    else if (loc3 >= 4 && loc3 < 12) 
                    {
                        loc1.type = 1;
                    }
                }
                else 
                {
                    loc2 = GlobalClass.getBitmap(ImagesConst.YellowItemBg);
                    if (loc3 != 12) 
                    {
                        loc2.x = 241;
                        loc2.y = 42;
                    }
                    else 
                    {
                        loc2.x = 241;
                        loc2.y = 0;
                    }
                    loc1.type = 2;
                }
                loc1.x = loc2.x + 3;
                loc1.y = loc2.y + 3;
                loc2.width = 38;
                loc2.height = 38;
                loc1.index = loc3;
                _skillItemArray.push(loc1);
                this.addChild(loc2);
                this.addChild(loc1);
                loc1.addEventListener(flash.events.MouseEvent.CLICK, onSkillItemClickHandler);
                ++loc3;
            }
            return;
        }
    }
